<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Vue页面结构</title>
    <script src="./lib/vue-2.4.0.js"></script>
    <style>
        /* vue中使用动画必须给对应标签设置宽度 */
        .p{
            width:100px;
            font-size:14px;
        }

        .bounce-enter,.bounce-leave-to{
            color:red;
            /* transform: rotateZ(90deg) */
            /* background-color: #CCC; */
        }
        .bounce-enter-active {
            animation: bounce-in .5s;
        }
        .bounce-leave-active {
            animation: bounce-in .5s reverse;
        }
        .bounce-enter-to,.bounce-leave{
            color:green;
            /* transform: rotateZ(120deg) */
            /* background-color: green; */
        }
        /* 定义动画 */
        @keyframes bounce-in {
            0% {
                transform: scale(1);
            }
            50% {
                transform: scale(2.5);
            }
            100% {
                transform: scale(2.5);
            }
        }
    </style>
</head>
<body>
    <div id="app">
            <button @click="show = !show">Toggle show</button>
            <transition name="bounce">
                <p class="p" v-show="show">hello vuejs </p>
            </transition>
    </div>
</body>
<script>
    var vm=new Vue({
        el:'#app',
        data:{
            show:true
        },
        methods:{
        },
        //生命周期函数
        created:function(){
        },
        mounted:function(){
        }
    });
</script>
</html>